//生产机
function* fibs() {

	let a = 1
	while (a < 10) {
		yield [a, a * 2] //产物  0 1 2 3 4 5 .....
		a++
	}

}

for (let s of fibs()) {
	console.log(s)
}

//setPrototypeOf实现继承
const obj1 = {};
const obj2 = {
	foo: 'bar'
};
Object.setPrototypeOf(obj1, obj2);
console.log(obj1.__proto__,obj2)
